#ifndef INET_ADDRESS_H
#define INET_ADDRESS_H

#include <string>
#include <arpa/inet.h>
#include <netinet/in.h>

using std::string;

class InetAddress
{
private:
    string _ip;
    unsigned short _port;
    sockaddr_in _addr;

public:
    InetAddress(const char *ip, unsigned short port);
    InetAddress(const sockaddr_in &sock);

    unsigned short port() const;
    string ip() const;
    sockaddr_in getSockaddr() const;
    sockaddr_in *getSockaddrPtr();
};

#endif